#ifndef WEATHER_FORECAST_H
#define WEATHER_FORECAST_H

#include "citydata.h"

#include <QWidget>
#include "ui_Weather_Forecast.h"

class Weather_Forecast : public QWidget
{
    Q_OBJECT

public:
    explicit Weather_Forecast(QWidget *parent = nullptr);
    ~Weather_Forecast();
    bool eventFilter(QObject *watched, QEvent *event) override;

protected:
    void paintHighCurve();
    void paintLowCurve();

private slots:
    void on_pushButton_clicked();

    void on_provinceSelectBox_currentTextChanged(const QString &arg1);

    void on_citySelectBox_currentTextChanged(const QString &arg1);

    void on_pushButton_2_clicked();

private:
    Ui::Weather_Forecast *ui;


    QString getCityCode();
    QVector<Province> provinces;

    QLabel *typewordLabel[7];
    QLabel *typeiconLabel[7];
    QLabel *date[7];
    QLabel *wind[7];
    QLabel *air[7];

    QString highTempStr[7] = {"", "", "", "", "", "", ""};
    int highTemp[7] = {0};
    QString lowTempStr[7] = {"", "", "", "", "", "", ""};
    int lowTemp[7] ={0};
};

#endif // WEATHER_FORECAST_H
